package com.baiyun.lease.common.login;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: 许瑞淇
 * @Date: 2024/06/16/22:47
 * @Description:
 */
public class LoginUserHolder {
    private static ThreadLocal<LoginUser> threadLocal = new ThreadLocal<>();

    public static void setLoginUser(LoginUser loginUser){
        threadLocal.set(loginUser);
    }
    public static LoginUser getLoginUser(){
        return threadLocal.get();
    }
    public static void clear(){
        threadLocal.remove();
    }
}
